﻿using ArticleContentCreate.ViewManger;
using CatUtils.Utils.Currency.IoUtils;
using CatUtils.Utils.Currency.TextUtils;
using CatUtils.Utils.SpecialUtils.View;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace ArticleContentCreate
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
            CbMain.Items.AddRange(new List<string> { "P站画师", "动漫信息", "P站图集" }.ToArray());
            new ViewInfoMemory().InitComboboxSaveInfo(CbMain);
            InitView();
        }

        private void InitView()
        {
            FloderHelper.InitFloder();
            new ViewReplace().SelectIndexGet(groupBox1);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FloderHelper.OpenFloder(".\\");
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            new ViewInfoMemory().SaveComboBoxInfo(CbMain);
            new ViewReplace().SelectChange(groupBox1, CbMain.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            while (true)
            {
                int GetRandom = TextHelper.GetRandom(8);
                Console.WriteLine(GetRandom);
                if (GetRandom == 8)
                    return;
            }
        }
    }
}